
<%@ page import="cm.NewsDao.NewsDao1" %>
<%@ page import="cm.NewsDaoImpl.NewsDaoImpl1" %>
<%@ page import="cm.entity.News1" %><%--
  Created by IntelliJ IDEA.
  User: 31052
  Date: 2022/4/6
  Time: 16:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
        <%
            String newsid = request.getParameter("newsid");
            /*获取id*/
            if (newsid != null || newsid !=""){
                int num = Integer.parseInt(newsid);
                NewsDao1 newsDao1 = new NewsDaoImpl1();
                News1 news1 = newsDao1.selectById(num);
                session.setAttribute("news",news1);
                /*转向*/
                request.getRequestDispatcher("ModifyNews.jsp").forward(request,response);
            }
        %>
</body>
</html>
